home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
batch
/
WHEN12.ARJ
/
WHENISIT.DOC
< prev
next >
Wrap
Text File
|
1992-05-01
|
13KB
|
367 lines
STEENBURGH'S STUFF
Mildly Useful Utilities
For Batch Files
Version 2.0
Copyright 1991,1992 by Chuck Steenburgh and Tay-Jee Software
_______
____|__ | (TM)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Page 1
WHENISIT 1.2 |
Copyright 1991 by Chuck Steenburgh
WHENISIT is a highly flexible utility to provide control in
DOS batch files based on time and date. With its many op-
tions, WHENISIT will allow your batch files to determine the
year, month, date, day of the week, hour, minute, second, or
whether it is morning or afternoon and make intelligent de-
cisions based on this information. WHENISIT is also able to
perform actions once a day (such as at the first boot-up of the
day).
For example, you may want certain actions performed at
boot time on certain days of the week or month. Adding
WHENISIT to your AUTOEXEC.BAT file can allow you to make
these sort of decisions. (Or allow your computer to make them
for you automatically.)
Usage:
WHENISIT [option]
where [option] is one of the following:
/? Displays help screen
/a Returns errorlevel based on am or pm.
/d Returns errorlevel equal to date.
/h Returns errorlevel equal to the hour
(24-hour clock).
/m Returns errorlevel equal to month.
/mi Returns errorlevel equal to minute.
/s Returns errorlevel equal to second.
/w Returns errorlevel based on the day
of the week.
/y Returns errorlevel equal to the last
two digits of the year.
hh:mm 24-hour time. |
mm/dd/yy Date. |
Entering the time in the form hh:mm will check to see if |
the current time is equal to, before, or after the time entered.|
If the current time is later than the time entered, an error- |
level of 2 is returned. If the current time is entered, an |
errorlevel of 1 is returned. If the time entered is later than |
Page 2
the current time, an errorlevel of 0 is returned. Entering the |
date in the form mm/dd/yy will check the current date against |
the value entered, and return an errorlevel as described above. |
Entering WHENISIT alone on the command line will generate an
errorlevel of 1 if WHENISIT has not been executed yet that day.
Otherwise, an errorlevel of 0 will be returned. Note that if
you maintain multiple copies of WHENISIT.EXE on your system,
each copy of WHENISIT will keep track of whether or not it has
run separately from any other copies. Be sure you know which
copy you are executing! This is useful to put in AUTOEXEC.BAT
to indicate actions you want performed only ONCE each day, no
matter how many times you re-boot your computer. (Once-a-day
mode)
Examples:
WHENISIT /a Returns errorlevel of 2 if it is pm,
or 1 if it is am.
WHENISIT /y If your clock is set to the year
1991, returns an errorlevel of 91.
WHENISIT /w If your clock indicates that it is
Tuesday, returns an errorlevel of 3.
WHENISIT 12/25/91 If current date is AFTER 12/25/91, |
returns errorlevel of 2. If current |
date is 12/25/91, returns errorlevel |
of 1. If current date is earlier |
than 12/25/91, errorlevel of 0 is |
returned. |
WHENISIT Returns errorlevel of 0 if WHENISIT
has already executed, 1 if not.
Errorlevel Chart:
Errorlevel Switch: /a /m /d
---------- --------------------------------------
1 AM January Sunday
2 PM February Monday
3 na March Tuesday
4 na April Wednesday
5 na May Thursday
6 na June Friday
7 na July Saturday
8 na August na
9 na September na
10 na October na
11 na November na
12 na December na
The errorlevels returned through the use of other switches
Page 3
should be self-explanatory.
The following errorlevel values indicate a syntax error: |
Errorlevel Error |
========== ===== |
250 Invalid day (within entered date) |
251 Invalid month (within entered date) |
252 Invalid year (within entered date) |
253 Invalid minute (within entered time) |
254 Invalid hour (within entered time) |
255 Too many arguments on command line |
OMBUDSMAN
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The
ASP Ombudsman can help you resolve a dispute or problem with
an ASP member, but does not provide technical support for
members' products. Please write to the ASP Ombudsman at 545
Grover Road, Muskegon, MI 49442 or send a CompuServe message
via CompuServe Mail to ASP Ombudsman, 70007,3536.
DISCLAIMER
The programs described in this documentation are guaran-
teed to do absolutely nothing! They have, however, in my exper-
ience performed essentially as described herein. The author
will not be responsible for any loss or damages caused through
the use of these programs. No warranty, express or implied,
is provided for this software's performance, merchantability,
or fitness for a particular purpose.
All trademarks are property of their respective owners.
The programs and documentation are Copyright 1991,1992 by
Chuck Steenburgh. You are encouraged to distribute these pro-
grams provided the following conditions are met:
- all files contained in the archive or distribution disk
must be distributed together in UNMODIFIED form
- you charge no more than a reasonable fee for copying or
subscription, and clearly indicate that payment of such
a fee does NOT grant ownership of the programs.
This program is part of set of utilities known as STEEN-
BURGH'S STUFF (Mildly Useful Utilities). The full set of
Page 4
utilities includes the following programs:
BATBOX: Simple menu creation/input system
CHKPRN: Checks parallel printer status
CLK: Displays time on screen
CURSOR: Change cursor shape
DOSVER: Checks for DOS version currently running
INPUT: Simple prompt/input system
KLS: Colorful screen-clearing utility
LAUNCHER: File selection/execution system
MUSIC: Plays transcribed sheet music on the PC
RAND: Random number generator
SKIP: Prints blank lines from batch files
SOUNDER: Wide range of noise making options
SPACE: File/disk space reporting utility
WAITFOR: Timed pauses
WHENISIT: Date/time telling utility
WRITE: Colorful output anywhere on screen
XD: Create/switch directories at the same time
You may evaluate these programs for up to 30 days on a free
trial basis. After 30 days, you should register your use of
these programs. The registration fee is $20, payable to the
author at the address given below. For those registering
directly with Tay-Jee Software, we offer a $5 cash discount.
Let's be real: I don't plan to make a lot of money this way.
Registration does have its advantages:
- I am improving these programs all the time. Registration
will get you IMMEDIATELY a disk with the latest version.
You will also get the next major release of the program set
sent to you free of charge.
- While I can't promise to include everyone's suggestions
in program updates, you can bet I'll listen to registered
users before any of you scrounges out there.
- You will make me feel all warm and fuzzy and appreciated,
and all that good stuff.
- You will also get an evaluation copy of my text file for-
matting program (used to produce the margins in this doc-
ument), and any other electronic creations I have decided
to unleash on a foolish, unsuspecting world.
Send comments/registrations to:
Tay-Jee Software
Post Office Box 835
Lexington, VA 24450
(703)464-5290
!!!VIRGINIA RESIDENTS ADD 4.5SALES TAX!!!
Page 5
CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
Page 6